-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add beforeEmailSent and beforeSmsSent trigger types #1621
Conversation
…te and beforeSignIn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with tiny nits, thanks!
src/common/providers/identity.ts
Outdated
recaptchaActionOverride?: RecaptchaActionOptions; | ||
} | ||
|
||
/** The handler response type for beforeCreate blocking events */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's backtick this like the above event type.
src/v2/providers/identity.ts
Outdated
|
||
/** | ||
* Handles an event that is triggered before an email is sent to a user. | ||
* @param opts - Object containing function options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a period.
src/v2/providers/identity.ts
Outdated
|
||
/** | ||
* Handles an event that is triggered before an SMS is sent to a user. | ||
* @param opts - Object containing function options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing period.
src/common/providers/identity.ts
Outdated
export type EmailType = "EMAIL_SIGN_IN" | "PASSWORD_RESET"; | ||
|
||
/** | ||
* The type of SMS message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we include the comment below to the type comment above so it shows up in the reference docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With salient details about valid values in the text preferably, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG! Miniscule nit in doc string.
src/common/providers/identity.ts
Outdated
@@ -326,25 +334,50 @@ export interface Credential { | |||
signInMethod: string; | |||
} | |||
|
|||
/** | |||
* Possible types of emails as described by the GCIP backend, which can be: | |||
* - An sign-in email |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just "A sign-in email". (not "An")
Merges changes from the beforeEmailSent (#1492) and beforeSmsSent (#1589) PRs.